package com.yenlien.traceyun.plant.entity;

import com.yenlien.traceyun.plant.bean.SpecDTO;
import com.yenlien.traceyun.webase.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @Date 2022/9/28
 * @Author jiaLong
 * @Descript 西昌商品
 */

@Entity
@Table(name = "t_cold_product")
public class ColdProduct extends BaseEntity {

    private String productName;     // 商品名称

    private String type;            // 水果商品或农资商品   1=水果  2=农资/贸

    private String productCategory; // 商品类目

    private String categoryId;      // 类目ID

    private String companyId;         // 所属企业ID
    private String companyName;      // 所属企业名称

    private String unit;            // 商品单位

    private String saleState;       // 销售状态 在售 下架

    private Integer stockNum;       // 商品总库存

    private String img;             // 商品图片, 多个用 ; 分割

    @Column(name = "`intro`", columnDefinition = "text")
    private String intro;       // 商品简介

    @Column(name = "`introduce`", columnDefinition = "text")
    private String introduce;       // 商品详细介绍

    @Column(name = "`spec`", columnDefinition = "text")
    private String spec;            // 商品规格， 使用JSON数组存储

    @Transient
    private List<SpecDTO> specDTOList;

    @Transient
    private String priceStart;  // 价格范围
    @Transient
    private String priceEnd;

    public String getPriceStart() {
        return priceStart;
    }

    public void setPriceStart(String priceStart) {
        this.priceStart = priceStart;
    }

    public String getPriceEnd() {
        return priceEnd;
    }

    public void setPriceEnd(String priceEnd) {
        this.priceEnd = priceEnd;
    }

    public String getType() {
        return type;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getProductName() {
        return productName;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductCategory() {
        return productCategory;
    }

    public void setProductCategory(String productCategory) {
        this.productCategory = productCategory;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getSaleState() {
        return saleState;
    }

    public void setSaleState(String saleState) {
        this.saleState = saleState;
    }

    public Integer getStockNum() {
        return stockNum;
    }

    public void setStockNum(Integer stockNum) {
        this.stockNum = stockNum;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public List<SpecDTO> getSpecDTOList() {
        return specDTOList;
    }

    public void setSpecDTOList(List<SpecDTO> specDTOList) {
        this.specDTOList = specDTOList;
    }
}
